package util;

import data.obj.Sheet;
import data.reader.StatPotentialReader;

public class StatPotential
{
	private Sheet statPotential;

	public StatPotential() throws Exception
    {
	   inizialize();
    }

	private void inizialize() throws Exception
    {
		String path="src/data/table/sp.txt";
		StatPotentialReader statPotentialReader = new StatPotentialReader(path);
		statPotentialReader.process();
		statPotential= new Sheet(statPotentialReader.getTable());
	  
    }

	public double getValue(double roll, double stat)
    {
		double res = statPotential.getValue(roll, stat);
		
	    return res==0? stat: res;
    }
	
	
																					
}
